package com.shopx.sys.service;

import com.shopx.cmm.DTO.PageDTO;
import com.shopx.sys.bean.SysCompany;
import com.shopx.sys.dto.CpTreeDTO;
import com.shopx.sys.dto.CpTreeShowDTO;
import com.shopx.sys.model.SysCompanyModel;

import java.math.BigDecimal;
import java.util.List;
//import com.shopx.base.exception.ShopxException;

/**
 * TODO
 *
 * @author lituo
 * @className: SysCompany
 * @date 2021-12-07
 */
public interface ISysCompanyService {

  /**
   * 查询明细记录
   *
   * @param sysCompany
   * @return SysCompanyModel
   * @author lituo
   * @date 2021-12-07
   */
  SysCompanyModel selectByPrimaryKey(SysCompany sysCompany);

  /**
   * 新增记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  String insertSelective(SysCompany sysCompany);

  /**
   * 修改记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int updateByPrimaryKeySelective(SysCompany sysCompany);

  /**
   * 删除记录
   *
   * @param sysCompany
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int deleteByPrimaryKey(SysCompany sysCompany);


  /**
   * 查询总记录数
   *
   * @param sysCompanyModel
   * @return int
   * @author lituo
   * @date 2021-12-07
   */
  int selectCount(SysCompanyModel sysCompanyModel);

  /**
   * 查询列表
   *
   * @param sysCompanyModel
   * @return List<SysCompanyModel>
   * @author lituo
   * @date 2021-12-07
   */
  List<SysCompanyModel> selectList(SysCompanyModel sysCompanyModel);

  /**
   * 分页查询
   *
   * @param sysCompanyModel
   * @return PageModel<SysCompanyModel>
   * @author lituo
   * @date 2021-12-07
   */
  PageDTO<SysCompanyModel> getListPage(SysCompanyModel sysCompanyModel);

  /**
   * 企业申请入驻列表
   *
   * @return com.shopx.cmm.dto.PageDTO<com.shopx.sys.model.SysCompanyModel>
   * @author lituo
   * @date 10:45 AM 2021/12/12
   * @param  sysCompanyModel
   */
  PageDTO<SysCompanyModel> queryApplyEnterList(SysCompanyModel sysCompanyModel);

  /**
   * 企业列表查询
   *
   * @return com.shopx.cmm.dto.PageDTO<com.shopx.sys.model.SysCompanyModel>
   * @author lituo
   * @date 1:33 PM 2021/12/26
   * @param  sysCompanyModel
   */
  PageDTO<SysCompanyModel> queryEnterList(SysCompanyModel sysCompanyModel);


  /**
   * 验证企业状态
   *
   * @return
   * @author lituo
   * @date 9:58 AM 2021/12/10
   * @param  cpId
   */
  void checkCompanyState(String cpId);

  /**
   * 赠送订单
   *
   * @param sysCompany
   */
  void giveOrder(SysCompany sysCompany);

  /**
   * 下线
   *
   * @param sysCompany
   * @return
   */
  void offline(SysCompany sysCompany);

  /**
   * 上线
   *
   * @param sysCompany
   * @return
   */
  void online(SysCompany sysCompany);

  /**
   * @return com.shopx.sys.model.SysCompanyModel
   * @descript 管理员查询企业明细信息
   * @author lituo
   * @date 2021/12/28 13:54
   */
  SysCompanyModel entDetail();

  /**
   * @param sysCompany
   * @return void
   * @descript 管理员修改企业基本信息
   * @author lituo
   * @date 2021/12/28 13:55
   */
  void entUpdate(SysCompany sysCompany);

  /**
   * 查询企业余额
   *
   * @return java.math.BigDecimal
   * @author lituo
   * @date 3:10 PM 2022/1/2
   * @param  cpId
   */
  BigDecimal queryCompanyBalance(String cpId);

  /**
   * @descript 企业签单扣费
   *
   * @param cpId
   * @author lituo
   * @date 2022/3/1 14:25
   * @return BigDecimal 扣款金额
   */
  SysCompany companySignOrder(String cpId,String projId);

  /**
   * 查询公司树菜单
   * @return
   */
  List<CpTreeShowDTO> selectCpTree(SysCompany sc);
}

